import { errFunc } from "./index";
export default [
  {
    //推广商管理页面
    path: "/extension/list",
    name: "extensionList",
    meta: {
      noCache: true,
      title: '推广商管理',
      module: "extensionList", // 用于菜单判断当前选中项
      parent: "extension" // 如果设置了该字段,值为菜单展开项
    },
    component: () =>
      import("@/views/extension/list").catch(err => {
        errFunc(err);
      })
  },
  {
    //推广员管理页面
    path: "/extension/listchild",
    name: "extensionListChild",
    meta: {
      noCache: true,
      title: '推广员管理',
      module: "extensionListChild", // 用于菜单判断当前选中项
      parent: "extension" // 如果设置了该字段,值为菜单展开项
    },
    component: () =>
      import("@/views/extension/listchild").catch(err => {
        errFunc(err);
      })
  },
  {
    //推广商管理详情页面（编辑）
    path: "/extension/managedetail",
    name: "extensionManagedetail",
    meta: {
      title: '推广员',
      module: "extensionManagedetail", // 用于菜单判断当前选中项
      parent: "extension" // 如果设置了该字段,值为菜单展开项
    },
    component: () =>
      import("@/views/extension/list/detail").catch(err => {
        errFunc(err);
      })
  },
  {
    //母包管理
    path: "/extension/mubao",
    name: "extensionMubao",
    meta: {
      noCache: true,
      title: '母包管理',
      module: "extensionMubao", // 用于菜单判断当前选中项
      parent: "extension" // 如果设置了该字段,值为菜单展开项
    },
    component: () =>
      import("@/views/extension/mubao").catch(err => {
        errFunc(err);
      })
  },
  {
    //母包管理-查看/新建/编辑
    path: "/extension/mubaodetail",
    name: "extensionMubao",
    meta: {
      title: '母包',
      module: "extensionMubao", // 用于菜单判断当前选中项
      parent: "extension" // 如果设置了该字段,值为菜单展开项
    },
    component: () =>
      import("@/views/extension/mubao/detail").catch(err => {
        errFunc(err);
      })
  },
  {
    //子包管理
    path: "/extension/child",
    name: "extensionChild",
    meta: {
      noCache: true,
      title: '子包管理',
      module: "extensionChild", // 用于菜单判断当前选中项
      parent: "extension" // 如果设置了该字段,值为菜单展开项
    },
    component: () =>
      import("@/views/extension/child").catch(err => {
        errFunc(err);
      })
  },
  {
    //子包管理 -查看/新建/编辑
    path: "/extension/childdetail",
    name: "extensionChilddetail",
    meta: {
      title: '子包',
      module: "extensionChilddetail", // 用于菜单判断当前选中项
      parent: "extension" // 如果设置了该字段,值为菜单展开项
    },
    component: () =>
      import("@/views/extension/child/detail").catch(err => {
        errFunc(err);
      })
  },
  {
    //推广分配方案配置
    path: "/extension/splitallocation",
    name: "extensionSplitallocation",
    meta: {
      noCache: true,
      title: '推广分配方案配置',
      module: "extensionSplitallocation", // 用于菜单判断当前选中项
      parent: "extension" // 如果设置了该字段,值为菜单展开项
    },
    component: () =>
      import("@/views/extension/splitallocation").catch(err => {
        errFunc(err);
      })
  },
  {
    // 推广分配方案配置 - 查看/新建/编辑
    path: "/extension/splitcreate", //创建推广方案配置
    name: "extensionSplitallocation",
    meta: {
      title: '推广分配方案',
      module: "extensionSplitallocation", // 用于菜单判断当前选中项
      parent: "extension" // 如果设置了该字段,值为菜单展开项
    },
    component: () =>
      import("@/views/extension/splitallocation/create").catch(err => {
        errFunc(err);
      })
  }
];
